package com.job.structureType.decorator;

/**
 * @Author 王博
 * @DateTime 2025-06-12 18:57
 */
public class Client {
    public static void main(String[] args) {
        FastFood fastFood = new FiredRice();
        System.out.println("花费"+fastFood.cost()+"元，吃了一份"+fastFood.getDesc());

        System.out.println("***************************");

        fastFood = new Egg(fastFood);
        System.out.println("花费"+fastFood.cost()+"元，吃了一份"+fastFood.getDesc());

        System.out.println("***************************");

        fastFood = new PeiGen(fastFood);
        System.out.println("花费"+fastFood.cost()+"元，吃了一份"+fastFood.getDesc());


    }
}
